export default function fetch(option){
  const BASE_URL = 'https://locally.uieee.com/'
  return new Promise((resolve, reject)=>{
    wx.request({
      url:  BASE_URL + option.url,
      method: option.method || 'GET',
      data:option.data || {},
      header: option.header || {},
      success: function(res){
        resolve(res)
      },
      fail:function(){
        reject()
      }
    })
  })
}